package com.fullstuck.service.impl;

import com.fullstuck.demo.Student;
import com.fullstuck.dao.impl.StudentDaoimpl;
import com.fullstuck.service.StudentService;

import java.util.List;
import java.util.Map;

public class StudentServiceimpl implements StudentService {
    //引入Student 依赖注入
    private  StudentDaoimpl studentDaoimpl;
    //引入名字 依赖注入
    private String studentname;

    //注入list
    private List<String> list;
    //注入map
    private Map<String,String> map1;
    //注入含有对象的map
    private Map<String, Student> stu_map;


    public void setList(List<String> list) {
        this.list = list;
    }

    public void setMap1(Map<String, String> map1) {
        this.map1 = map1;
    }

    public void setStu_map(Map<String, Student> stu_map) {
        this.stu_map = stu_map;
    }

    public void setStudentname(String studentname) {
        this.studentname = studentname;
    }

    public void setStudentDaoimpl(StudentDaoimpl studentDaoimpl) {
        this.studentDaoimpl = studentDaoimpl;
    }

    public StudentServiceimpl(StudentDaoimpl studentDaoimpl) {
        this.studentDaoimpl = studentDaoimpl;
    }




    //执行的方法
    public void dostudy() {
        //注入的对象
        studentDaoimpl.study();
        //注入的普通信息
        System.out.println(studentname);
        //注入的list集合
        System.out.println(list);
        //注入的普通map集合
        System.out.println(map1);
        //注入的带有对象的map集合

        System.out.println(stu_map);
    }
}
